package com.itheima.project.handler;

import com.itheima.project.vo.security.EnterpriseVo;
import com.itheima.project.vo.security.UserVo;
import org.springframework.security.oauth2.common.OAuth2AccessToken;
import org.springframework.web.HttpRequestMethodNotSupportedException;

import java.security.Principal;
import java.util.Map;

/**
 * @ClassName LoginAdapter.java
 * @Description 登陆处理器接口
 */
public interface LoginAuthHandler {

    /***
     * @description 密码登录
     * @param parameters   登录参数
     * @return
     */
    UserVo loginHandler(Principal principal, Map<String, String> parameters, EnterpriseVo enterpriseVo)
            throws HttpRequestMethodNotSupportedException;

    /***
     * @description 用户信息查询
     * @param loginType 登录类型
     * @param username  账号信息：用户名或者手机号或者openId
     * @param enterpriseId  企业号
     * @return: com.itheima.project.vo.security.UserVo
     */
    UserVo findUserDetail(String loginType,String username,Long enterpriseId);

}
